package com.zhijie.contract.demo;

import com.zhijie.api.customer.DemoTestApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("contract")
public class CustomerDemoTestController {

    /**
     * 动态代理对象，内部远程调用服务生产者
     */
    @Autowired
    private DemoTestApiService demoTestApiService;

    @GetMapping("demo")
    public String demo(@RequestParam("val")String val){
//        return "demoTestApiService.demo(val)";
        return demoTestApiService.demo(val);
    }

}
